package com.stormrage.entity.adm;

import java.io.Serializable;
import java.util.List;

/**
 * @author www.stormragetech.com
 * @date 2016年1月19日
 * @version 1.0.0
 */
public class AdmRes implements Serializable {

	// ------------------------------ Fields ------------------------------

	private static final long serialVersionUID = 167059325748387608L;

	// ------------------------------ Fields ------------------------------

	private Integer id; // 编号

	private String res; // 资源名称

	private String resType; // 资源类型

	private String resUrl; // 资源链接

	private Integer parentId; // 父亲id

	private String permission; // 权限字符串

	private Integer locked;

	private List<AdmRes> children;

	// ------------------------------ Fields ------------------------------

	public AdmRes() {
	}

	// ------------------------------ Fields ------------------------------

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getRes() {
		return res;
	}

	public void setRes(String res) {
		this.res = res;
	}

	public String getResType() {
		return resType;
	}

	public void setResType(String resType) {
		this.resType = resType;
	}

	public String getResUrl() {
		return resUrl;
	}

	public void setResUrl(String resUrl) {
		this.resUrl = resUrl;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public Integer getLocked() {
		return locked;
	}

	public void setLocked(Integer locked) {
		this.locked = locked;
	}

	public List<AdmRes> getChildren() {
		return children;
	}

	public void setChildren(List<AdmRes> children) {
		this.children = children;
	}

	// ------------------------------ Fields ------------------------------

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " res - " + res + " resType - " + resType + " resUrl - " + resUrl
				+ " parentId - " + parentId + " permission - " + permission + " locked - " + locked + " children - "
				+ children;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		AdmRes entity = (AdmRes) o;

		if (id != null ? !id.equals(entity.id) : entity.id != null)
			return false;

		return true;
	}

	@Override
	public int hashCode() {
		return id != null ? id.hashCode() : 0;
	}

}
